package com.suncreate.zhtz.iot.service;

import com.suncreate.zhtz.iot.mapper.*;
import com.suncreate.zhtz.iot.model.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class ScDataService {
    @Autowired
    private ScItemMapper sc_item_Mapper;

    @Autowired
    private MonitorHostMapper monitorHostMapper;

    @Autowired
    private GlobalRunSituationMapper globalRunSituationMapper;

    @Autowired
    private SignalRunSituationMapper signalRunSituationMapper;

    @Autowired
    private EmsItemMapper emsItemMapper;
    @Autowired
    private SituationToItemMapper situationToItemMapper;

    @Autowired
    private DvorStatusMapper dvorStatusMapper;
    @Autowired
    private ThalesStatusMapper thalesStatusMapper;

    @Autowired
    private DvorDataMapper dvorDataMapper;
    @Autowired
    private DmeDataMapper dmeDataMapper;
    @Autowired
    private AttributeToFieldMapper attributeToFieldMapper;

    public List<AttributeToFieldModel> queryAttributeToFieldList() {
        return attributeToFieldMapper.queryAttributeToFieldList();
    }

    public List<DmeDataModel> queryDmeDataRealData() {
        return dmeDataMapper.queryDmeDataRealData();
    }

    public List<ThalesStatusModel> queryThalesStatusRealData() {
        return thalesStatusMapper.queryThalesStatusRealData();
    }
    public List<DvorStatusModel> queryDvorStatusRealData() {
        return dvorStatusMapper.queryDvorStatusRealData();
    }

    public List<DvorDataModel> queryDvorDataRealData() {
        return dvorDataMapper.queryDvorDataRealData();
    }

    public List<ScItemModel> queryScItemListbyKey(String key) {
        return sc_item_Mapper.queryItemListbyKey(key);
    }

    public List<ScItemModel> queryScItemListbyGroupKey(String groupKey) {
        return sc_item_Mapper.queryScItemListbyGroupKey(groupKey);
    }


    public List<MonitorHostModel> queryMonitorHostListbyKeyAndStatus(String key, int status) {
        return monitorHostMapper.queryMonitorHostListbyKeyAndStatus(key,status);
    }

    public List<GlobalRunSituationModel> queryGlobalRunSituation() {
        return globalRunSituationMapper.queryGlobalRunSituation();
    }
    public List<SignalRunSituationModel> querySignalRunSituation() {
        return signalRunSituationMapper.querySignalRunSituation();
    }
    public List<EmsItemModel> queryEmsItemListbyKey(String key) {
        return emsItemMapper.queryItemListbyKey(key);
    }

    public List<EmsItemModel> queryEmsItemListbyGroupId(String groupId) {
        return emsItemMapper.queryEmsItemListbyGroupId(groupId);
    }

    public List<SituationToItemModel> querySituationToItemListByGlobalKey(String globalkey)
    {
        return situationToItemMapper.querySituationToItemListByGlobalKey(globalkey);
    }
    public List<SituationToItemModel> querySituationToItemListBySignalKey(String signalkey)
    {
        return situationToItemMapper.querySituationToItemListBySignalKey(signalkey);
    }
}
